<%@ page contentType="text/html;charset=UTF-8" %>
<html>
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge; charset=UTF-8">
        <title><g:layoutTitle default="${message(code: 'site.title')}"/></title>
        <noscript><META HTTP-EQUIV="Refresh" CONTENT="0;URL=${createLink(action: 'jsCheck')}"></noscript>
        <!-- jQuery -->
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <!-- Bootstrap V3 -->
        <link rel="stylesheet" href="${resource(dir: 'css', file: 'bootstrap_blue.css')}" type="text/css">
        <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
        <!-- Bootstrap V2 -->
        <!--<link rel="stylesheet" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css">-->
        <!--<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>-->
        <!-- Grails CSS -->
        <link rel="stylesheet" href="${resource(dir: 'css', file: 'mars.css')}" type="text/css">
        <!-- Mars Js -->
        <script src="${resource(dir: 'js',file: 'mars.js')}"></script>
        <script>${actionName}();</script>
        <g:layoutHead/>
    </head>
    <body>
        <div class="container" id="header">
            <div class="row">
                <div class="col-md-12">
                    <div id="ban" style="height:150px;">
                        <!--<img src="http://placehold.it/360x56"/>-->
                        <!--<r:img dir="images" file="LOGO.jpg" style="max-width: 100%;height: auto;"/>-->
                        <ol class="breadcrumb" style="float:right;margin:0px0px;">
                            <li><g:link controller="front" action="index">首頁</g:link></li>
                            <li><g:link url="http://www.nlpi.edu.tw">國資圖首頁</g:link></li>
                            <g:if test="${session.accountLogin}"><li><a href="#">${session.accountName}</a></li></g:if>
                            <g:if test="${session.accountLogin}"><li><g:link controller="account" action="logout">登出</g:link></li></g:if>
                        </ol>
                    </div>
                </div>
            </div>
                <!-- Navi Bar -->
                <div class="row">
                <div class="col-md-12">
                    <nav class="navbar navbar-default" role="navigation">
                        <!-- Brand and toggle get grouped for better mobile display -->
                        <div class="navbar-header">
                            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                                <span class="sr-only">選單</span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </button>
                            <a class="navbar-brand" href="#"></a>
                        </div>                        
                        <!-- Collect the nav links, forms, and other content for toggling -->
                        <div class="collapse navbar-collapse" id="navbar">
                            <ul class="nav navbar-nav">
                            <li class="<% if (controllerName == 'front' && actionName == 'index') print 'active' %>">
                                <a href="${createLink(controller:'front', action:'index')}">近期場次</a>
                                </li>
                                <li class="<% if (controllerName == 'calendar' && actionName == 'index') print 'active' %>">
                                <a href="${createLink(controller:'calendar', action:'index')}">活動月曆</a>
                                </li>
                                <li class="<% if (actionName=='query'||actionName=='queryResult') print 'active' %>">
                                <a href="${createLink(controller:'front',action:'query')}">活動查詢</a>
                                </li>
                                <li class="<% if (actionName=='regQuery'||actionName=='regQueryResult') print 'active' %>">
                                <a href="${createLink(controller:'front',action:'regQuery')}">報名查詢</a>
                                </li>
                                <li class="<% if (actionName == 'regCancel') print 'active' %>">
                                <a href="${createLink(controller:'front',action:'regCancel')}">報名取消</a>
                                </li>
                                <!--
                                <li class="<% if (actionName == 'rule') print 'active' %>">
                                <a href="${createLink(controller:'front', action:'index')}">相關規定</a>
                                </li>
                                -->
                            </ul><!--nav navbar-nav-->
                            <ul class="nav navbar-nav navbar-right">
                                <!--<li><a href="javascript: history.back()">回上頁</a></li>-->
                            </ul>
                        </div>
                    </nav><!-- /.navbar-collapse -->
                </div>
            </div>
        </div>
        <div class="container" id="main">
            <g:layoutBody/>
        </div>
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <!--<hr/>-->
                    <div align="center" id="footer" style="text-shadow:1px 1px 0px #FFFFFF;">
                        All rights reserved © 2015 國立公共資訊圖書館<br/>
                        本站最佳瀏覽解析度：1280x768，建議採用Chrome、Firefox瀏覽器，本頁拜訪次數：<m:count name="${actionName}"/>/<m:count/><br/>
                        總館：402臺中市南區五權南路100號 諮詢電話：(04)22625100<br/>
                    </div>
                </div>
            </div>
        </div>
    </body>
    <!-- Background Js-->
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-backstretch/2.0.4/jquery.backstretch.min.js"></script>
    <script>
        $("#ban").backstretch("${resource(dir:'images',file: 'LOGO.jpg')}");
        $.backstretch("${resource(dir:'images',file: 'w3_background.gif')}");
        //$("#footer").backstretch("${resource(dir:'images',file: 'w3_background.gif')}");
        //$.backstretch("http://img.taopic.com/uploads/allimg/131226/234992-13122611260776.jpg");
    </script>
</html>